package com.ease.framework.flex.controls {
   import com.ease.framework.figures.IFigure;

   import flash.events.MouseEvent;

   import mx.containers.Canvas;

   public class Appender extends Canvas {
      public var container:IFigure;
      public var type:String;

      private var _startMove:Boolean = false;

      public function Appender() {
         super();
         width = 20;
         height = 20;

         addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
         addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
      }

      public function draw():void {
      }

      protected function onMouseDown(evt:MouseEvent):void {
         _startMove = true;
         evt.stopPropagation();
      }

      protected function onMouseMove(evt:MouseEvent):void {
         if (!_startMove)
            return;
         doMove(evt);

         _startMove = false;
         evt.stopPropagation();
      }

      protected function doMove(evt:MouseEvent):void {
      }
   }
}